package cn.formaggie.dao;

import cn.formaggie.entity.model.roleandpermission.Worker;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface WorkerDao {

    Worker getSimpleWorkerByWorkerId(@Param("workerId")String workerId);

    Worker getWorkerByWorkerId(@Param("workerId")String workerId);

    Integer modifyWorkerInfo(Worker worker);

    Integer modifyWorkerPsw(Map<String,String> map);

    List<Worker> getWorkersByRoleId(@Param("roleId")Integer roleId);

    Boolean hasRoleInWorkers(Integer roleId);

    List<Worker> findWorkers(Map<String,Object> map);

    Integer getWorkersCount(Map<String,Object> map);

    Integer addWorker(Worker worker);

    Integer deleteWorkerByWorkerId(Integer id);
}
